import request from "@/utils/request";

// 查询消耗记录列表
export function listMaterialConsume(query) {
  return request({
    url: "/cld/materialConsume/list",
    method: "get",
    params: query,
  });
}

// 查询消耗记录列表
export function getProjectConsumeList(query) {
  return request({
    url: "/cld/materialConsume/getProjectConsumeList",
    method: "get",
    params: query,
  });
}

// 查询消耗记录详细
export function getMaterialConsume(materialConsumeId) {
  return request({
    url: "/cld/materialConsume/" + materialConsumeId,
    method: "get",
  });
}

// 新增消耗记录
export function addMaterialConsume(data) {
  return request({
    url: "/cld/materialConsume",
    method: "post",
    data: data,
  });
}

// 修改消耗记录
export function updateMaterialConsume(data) {
  return request({
    url: "/cld/materialConsume",
    method: "put",
    data: data,
  });
}

// 删除消耗记录
export function delMaterialConsume(materialConsumeId) {
  return request({
    url: "/cld/materialConsume/" + materialConsumeId,
    method: "delete",
  });
}
